#include "ILogger.h"
//#include <cstdarg>
#include <stdarg.h>
//#include <stdio.h>


void ILogger::Log(const char* Format, ...)
{
    // put the message in a char*
    char sBuffer[512];
    va_list Params;
    va_start(Params, Format);

#ifdef _WIN
	vsnprintf_s(sBuffer, 512, 512, Format, Params);
#endif

#ifdef _GP2X
	vsnprintf(sBuffer, 512, Format, Params);
#endif

    va_end(Params);

    // write the message
    write(sBuffer);
}
